import http from '@/utils/http'
//  角色
export const rolesApi = () => {
    return http.get('/auth/role/roles');
}
//  角色详情
export const roleByUserApi = (userId) => {
    return http.get(`/auth/role/roles/${userId}`);
}
// 分配角色
export const assignRoleApi = (data) => {
    return http.post('/auth/user/assign', data);
}
//  角色修改
export const editRoleApi = (data) => {
    return http.post('/auth/role/edit',data);
}
//  角色新增
export const addRoleApi = (data) => {
    return http.post('/auth/role/add',data);
}
//  角色详情
export const roleInfByIdoApi = (roleId) => {
    return http.get(`/auth/role/info/${roleId}`);
}
//  角色删除
export const delRoleApi = (roleId) => {
    return http.get(`/auth/role/del/${roleId}`);
}